package com.iwhalecloud.bss.kite.cucc.service.attr.handler;

import com.iwhalecloud.bss.kite.common.util.KiteStringUtils;
import com.iwhalecloud.bss.kite.manager.inst.KiteAttr;
import com.iwhalecloud.bss.kite.manager.inst.KiteInst;
import com.iwhalecloud.bss.kite.service.attr.data.CustAttrData;
import com.iwhalecloud.bss.kite.service.attr.handler.AbstractAttrHandler;
import com.ztesoft.bss.common.bo.LoginInfo;
import com.ztesoft.bss.common.util.ContextUtil;

/**
 * 分公司
 */
public class FilialeAttrHandler extends AbstractAttrHandler<KiteInst, CustAttrData> {

    @Override
    public void def(KiteAttr attr, KiteInst inst, CustAttrData data) {
        LoginInfo loginInfo = ContextUtil.getLoginInfo();
        String orgName = loginInfo.getOrgInfo().getOrgName();
        if(!KiteStringUtils.isEmpty(orgName)){
            attr.setValue(orgName);
        }
    }
}
